<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>塞西莉亚真的好可爱</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            background-color: rgb(65, 65, 65);
        }
        .shell{
            width: 100%;
            height: 100%;
            background-color: #000;
            overflow: hidden;
        }
        /* 左侧图片 */
        .page{
            transform: translateX(-110%);
            position: absolute;
            width: 50%;
            height: 100%;
            transition: .5s;
            background-size: cover;
        }
        /* 将label定位在右下角 */
        .button{
            display: block;
            width: 10%;
            color: #fff;
            font-size: 30px;
            /* border-bottom: #fff solid 4px; */
            text-align: center;
            position: absolute;
            bottom: 10px;
            margin: 50px;
            left: calc(50% + (var(--i)*17%));
            z-index: 999;
            transition: .3s;
            border-bottom: solid 0px rgba(0,0,0,0);
        }
        /* 右侧文本 */
        .page_content{
            box-sizing: border-box;
            height: 100%;
            padding: 50px;
            color: #FFF;
            position: absolute;
            left: 100%;
            display: none;
            animation-name: fade;
            animation-duration: .7s;
            animation-iteration-count: 1;
            opacity: 1;
        }
        @keyframes fade{
            0%{
                opacity: 0;
            }
            50%{
                opacity: 0;
                transform: translateY(-50px);
            }
            100%{
                opacity: 1;
                transform: translateY(0px);
            }
        }
        /* 隐藏表单 */
        input{
            display: none;
        }
        /* 谁选中谁显示 */
        input:checked+.page{
            /* 图片移入 */
            transform: translateX(0px);
            transition: .4s;
        }
        input:checked+.page .page_content{
            width: 100%;
            display: block;
        }

        /* ———————————————————————————————————————— */
        .page:nth-child(3){
            background-image: url('./1.jpeg');
        }
        .page:nth-child(3) .page_content{
            background-color: rgb(185,130,130);
        }

        .page:nth-child(6){
            background-image: url('./2.jpeg');
        }
        .page:nth-child(6) .page_content{
            background-color: rgb(173,170,226);
        }

        .page:nth-child(9){
            background-image: url('./3.jpeg');
        }
        .page:nth-child(9) .page_content{
            background-color: rgb(236,180,110);
        }
        /* page_content里面的样式 */
        .page h1{
            font-size: 70px;
        }
        .page p{
            font-size: 30px;
            padding: 10px;
            background-color: rgba(0, 0, 0, .3);
            border-radius: 10px;
            margin: 30px 0;
        }
        .page span{
            font-size: 26px;
            letter-spacing: 2px;
            color: rgb(56, 56, 56);
        }
        /* 选中的时候变好看 */
        label:hover{
            /* 修改光标 */
            cursor: pointer;
            border-bottom: solid 4px rgba(0,0,0,0);
            font-size: 40px;
        }
    </style>
</head>

<body>
    <div class="shell">
        <!-- 用label和input连接 -->
        <label for="button1" class="button" style="--i:0">标题_A</label>
        <!-- 没有这个name的话点一次就失去效果 -->
        <!-- name属性用于对提交到服务器后的表单数据进行标识 -->
        <input type="radio" id="button1" name="page" checked>

        <div class="page">
            <div class="page_content">
                <h1>按钮_A</h1>
                <p>副标题_A</p>
                <span>
                    内容_A
                </span>
            </div>
        </div>


        <label for="button2" class="button" style="--i:1">标题_B</label>
        <input type="radio" id="button2" name="page">
        <div class="page">
            <div class="page_content">
                <h1>按钮_B</h1>
                <p>副标题_B</p>
                <span>
                    内容_B
                </span>
            </div>
        </div>


        <label for="button3" class="button" style="--i:2">标题_C</label>
        <input type="radio" id="button3" name="page">
        <div class="page">
            <div class="page_content">
                <h1>按钮_C</h1>
                <p>副标题_C</p>
                <span>
                    内容_C
                </span>
            </div>
        </div>
    </div>
</body>

</html>